package com.wbs.controller;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("message")
public class MsgController {
    @Autowired
    private RocketMQTemplate rocketMQTemplate;
    @RequestMapping("sendMessage")
    public void sendMessage(@RequestParam String phone){
        rocketMQTemplate.convertAndSend("captcha",phone);
    }
}